package com.itheima.feign;

import com.itheima.feign.fallback.GoodsFeignFallback;
import com.itheima.feign.fallback.GoodsFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "goods", fallback = GoodsFeignFallback.class)
// @FeignClient(value = "goods", fallbackFactory = GoodsFeignFallbackFactory.class)
// @FeignClient(value = "goods")
public interface GoodsFeign {

    /**
     * 获取一件商品
     */
    @GetMapping(value = "/goods/one/{max}")
    String one(@PathVariable(value = "max") Integer max);
}
